package com.example.company.model

import com.example.common.view.model.BaseResultData
import com.example.company.api.CompanyApiServer
import com.example.company.entity.CompanyDetailEntity
import com.example.company.entity.CompanyEntity
import com.example.company.entity.GetMerChant
import com.example.company.entity.MerChant
import com.example.company.entity.MerChantDetail
import com.example.company.entity.MerChantDetailEntity
import okhttp3.RequestBody
import javax.inject.Inject

class CompanyRepository @Inject constructor(private val apiServer: CompanyApiServer):CompanyApiServer{
    override suspend fun getCompany(): BaseResultData<List<CompanyEntity>> {
        return apiServer.getCompany()
    }

    override suspend fun getCompanyDetail(id: Int): BaseResultData<CompanyDetailEntity> {
        return apiServer.getCompanyDetail(id)
    }

    override suspend fun postMerchant(body: MerChant): BaseResultData<MerChant> {
        return apiServer.postMerchant(body)
    }

    override suspend fun getMerChant(): BaseResultData<List<GetMerChant>> {
        return apiServer.getMerChant()
    }

    override suspend fun getMerChantDetail(id: Int): BaseResultData<MerChantDetail> {
        return apiServer.getMerChantDetail(id)
    }

}